﻿/*----------------------------------------------------------------
// Copyright (C) 2013 苏州麦迪斯顿医疗科技股份有限公司
// 文件名：AuditTraceCallHandler.cs
// 文件功能描述：AuditTraceCallHandler
// 创建标识：顾伟伟-2014-04-03
----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity.InterceptionExtension;
using System.Reflection;
using System.Diagnostics;
using System.Threading;
using CPOE.Framework.Auditing;

namespace CPOE.Framework
{
    /// <summary>
    /// 审计用户行为,在方法上添加此类的Attribute声明后，方法在被执行时将自动注入以下行为
    /// </summary>
    public class LightCallHandler : ICallHandler
    {
      

        public LightCallHandler()
        {
          
        }

        public LightCallHandler(string moduleName, string componentName, string methodName, int Order)
        {
          
        }
        /// <summary>
        /// 在PolicyInjection处理审记日记
        /// </summary>
        /// <param name="input"></param>
        /// <param name="getNext"></param>
        /// <returns></returns>
        public IMethodReturn Invoke(IMethodInvocation input, GetNextHandlerDelegate getNext)
        {
            //执行目标方法
            IMethodReturn result = getNext()(input, getNext);
            
       
            return result;
        }




        /// <summary>
        /// 执行顺序
        /// </summary>
        public int Order
        {
            get;
            set;
        }
    }
}
